package com.thinkcube.edutainment.domain.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class MobileNumber {
	
	@JsonProperty("id")
	private String id;

	@JsonProperty("number")
	private String number;

	@JsonProperty("isPrimary")
	private Boolean isPrimary;

	public String getNumber() {
		return this.number;
	}

	public void setNumber(String number) {
		this.number = number;
	}
	
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Boolean getIsPrimary() {
		return this.isPrimary;
	}

	public void setIsPrimary(Boolean isPrimary) {
		this.isPrimary = isPrimary;
	}

	protected MobileNumber(Parcel in) {
		number = in.readString();
		isPrimary = in.readByte() != 0x00;
	}

	public MobileNumber() {
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(number);
		dest.writeByte((byte) (isPrimary ? 0x01 : 0x00));
	}

	public static final Parcelable.Creator<MobileNumber> CREATOR = new Parcelable.Creator<MobileNumber>() {
		public MobileNumber createFromParcel(Parcel in) {
			return new MobileNumber(in);
		}

		public MobileNumber[] newArray(int size) {
			return new MobileNumber[size];
		}
	};
}
